package com.cqc.flycotablayout01.activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

import com.cqc.flycotablayout01.R;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by ${cqc} on 2017/9/6.
 */

public class MainActivity extends AppCompatActivity {

    @BindView(R.id.btn_sliding)
    Button btnSliding;
    @BindView(R.id.btn_common)
    Button btnCommon;
    @BindView(R.id.btn_segment)
    Button btnSegment;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ButterKnife.bind(this);
    }

    @OnClick({R.id.btn_sliding, R.id.btn_common, R.id.btn_segment})
    public void onViewClicked(View view) {
        Intent intent = null;
        switch (view.getId()) {
            case R.id.btn_sliding:
                intent = new Intent(MainActivity.this, SlidingTabLayoutActivity.class);
                break;
            case R.id.btn_common:
                intent = new Intent(MainActivity.this, CommonTabLayoutActivity.class);
                break;
            case R.id.btn_segment:
                break;
        }
        startActivity(intent);
    }
}
